package com.yutel.multher.jas.comm;

import org.apache.commons.configuration.CompositeConfiguration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

public class JasConfig {
	private static JasConfig ins;
	public static CompositeConfiguration cc = new CompositeConfiguration();
	static {
		try {
			cc.addConfiguration(new PropertiesConfiguration("jas.properties"));
		} catch (ConfigurationException e) {
			e.printStackTrace();
		}
	}

	private JasConfig() {
	}

	public synchronized static JasConfig getInstance() {
		if (ins == null) {
			ins = new JasConfig();
		}
		return ins;
	}

	public CompositeConfiguration getCC() {
		return cc;
	}

	public String getString(String key) {
		return cc.getString(key);
	}

	public int getInt(String key) {
		return cc.getInt(key);
	}
}
